package jp.ac.u_tokyo.dch.core.db;

import java.io.InputStream;
import java.io.Reader;
import java.math.BigDecimal;
import java.net.URL;
import java.sql.Array;
import java.sql.Blob;
import java.sql.Clob;
import java.sql.Date;
import java.sql.Ref;
import java.sql.ResultSet;
import java.sql.ResultSetMetaData;
import java.sql.SQLException;
import java.sql.SQLWarning;
import java.sql.Statement;
import java.sql.Time;
import java.sql.Timestamp;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Map;

import jp.ac.u_tokyo.dch.core.exceptions.DBException;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

/**
 * ResultSet ラッパクラス
 *
 * @version 1.1
 */
public class CustomResultSet {

	/** ロガー */
	private static Log logger = LogFactory.getLog(CustomResultSet.class);

	/** ResultSet */
	private ResultSet rs = null;

	/**
	 * コンストラクタ
	 * @param rs ResultSet
	 */
	public CustomResultSet(ResultSet rs) {

		this.rs = rs;
	}

	public boolean absolute(int row) throws DBException {
		try {
			return this.rs.absolute(row);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public void afterLast() throws DBException {
		try {
			this.rs.afterLast();
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public void beforeFirst() throws DBException {
		try {
			this.rs.beforeFirst();
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public void cancelRowUpdates() throws DBException {
		try {
			this.rs.cancelRowUpdates();
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public void clearWarnings() throws DBException {
		try {
			this.rs.clearWarnings();
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public void close() throws DBException {
		try {
			this.rs.close();
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public void deleteRow() throws DBException {
		try {
			this.rs.deleteRow();
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public int findColumn(String columnName) throws DBException {
		try {
			return this.rs.findColumn(columnName);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public boolean first() throws DBException {
		try {
			return this.rs.first();
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public Array getArray(int i) throws DBException {
		try {
			return this.rs.getArray(i);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public Array getArray(String colName) throws DBException {
		try {
			return this.rs.getArray(colName);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public InputStream getAsciiStream(int columnIndex) throws DBException {
		try {
			return this.rs.getAsciiStream(columnIndex);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public InputStream getAsciiStream(String columnName) throws DBException {
		try {
			return this.rs.getAsciiStream(columnName);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public BigDecimal getBigDecimal(int columnIndex) throws DBException {
		try {
			BigDecimal decimal = this.rs.getBigDecimal(columnIndex);
			logger.debug(String.valueOf(columnIndex) + "番目 値=[" + decimal + "]");
			return decimal;
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public BigDecimal getBigDecimal(String columnName) throws DBException {
		try {
			BigDecimal decimal = this.rs.getBigDecimal(columnName);
			logger.debug("カラム吁E[" + String.valueOf(columnName) + "] 値=[" + decimal + "]");
			return decimal;
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	@SuppressWarnings("deprecation")
	public BigDecimal getBigDecimal(int columnIndex, int scale) throws DBException {
		try {
			BigDecimal decimal = this.rs.getBigDecimal(columnIndex, scale);
			logger.debug(String.valueOf(columnIndex) + "番目 スケール=[" + String.valueOf(scale) + "] 値=[" + decimal + "]");
			return decimal;
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	@SuppressWarnings("deprecation")
	public BigDecimal getBigDecimal(String columnName, int scale) throws DBException {
		try {
			BigDecimal decimal = this.rs.getBigDecimal(columnName, scale);
			logger.debug("カラム吁E[" + String.valueOf(columnName) + "] スケール=[" + String.valueOf(scale) + "] 値=[" + decimal + "]");
			return decimal;
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public InputStream getBinaryStream(int columnIndex) throws DBException {
		try {
			return this.rs.getBinaryStream(columnIndex);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public InputStream getBinaryStream(String columnName) throws DBException {
		try {
			return this.rs.getBinaryStream(columnName);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public Blob getBlob(int i) throws DBException {
		try {
			return this.rs.getBlob(i);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public Blob getBlob(String colName) throws DBException {
		try {
			return this.rs.getBlob(colName);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public boolean getBoolean(int columnIndex) throws DBException {
		try {
			return this.rs.getBoolean(columnIndex);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public boolean getBoolean(String columnName) throws DBException {
		try {
			return this.rs.getBoolean(columnName);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public byte getByte(int columnIndex) throws DBException {
		try {
			return this.rs.getByte(columnIndex);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public byte getByte(String columnName) throws DBException {
		try {
			return this.rs.getByte(columnName);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public byte[] getBytes(int columnIndex) throws DBException {
		try {
			return this.rs.getBytes(columnIndex);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public byte[] getBytes(String columnName) throws DBException {
		try {
			return this.rs.getBytes(columnName);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public Reader getCharacterStream(int columnIndex) throws DBException {
		try {
			return this.rs.getCharacterStream(columnIndex);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public Reader getCharacterStream(String columnName) throws DBException {
		try {
			return this.rs.getCharacterStream(columnName);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public Clob getClob(int i) throws DBException {
		try {
			return this.rs.getClob(i);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public Clob getClob(String colName) throws DBException {
		try {
			return this.rs.getClob(colName);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public int getConcurrency() throws DBException {
		try {
			return this.rs.getConcurrency();
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public String getCursorName() throws DBException {
		try {
			return this.rs.getCursorName();
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public Date getDate(int columnIndex) throws DBException {
		try {
			return this.rs.getDate(columnIndex);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public Date getDate(String columnName) throws DBException {
		try {
			return this.rs.getDate(columnName);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public Date getDate(int columnIndex, Calendar cal) throws DBException {
		try {
			return this.rs.getDate(columnIndex, cal);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public Date getDate(String columnName, Calendar cal) throws DBException {
		try {
			return this.rs.getDate(columnName, cal);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public double getDouble(int columnIndex) throws DBException {
		try {
			return this.rs.getDouble(columnIndex);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public double getDouble(String columnName) throws DBException {
		try {
			return this.rs.getDouble(columnName);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public int getFetchDirection() throws DBException {
		try {
			return this.rs.getFetchDirection();
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public int getFetchSize() throws DBException {
		try {
			return this.rs.getFetchSize();
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public float getFloat(int columnIndex) throws DBException {
		try {
			return this.rs.getFloat(columnIndex);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public float getFloat(String columnName) throws DBException {
		try {
			return this.rs.getFloat(columnName);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public int getInt(int columnIndex) throws DBException {
		try {
			return this.rs.getInt(columnIndex);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public int getInt(String columnName) throws DBException {
		try {
			return this.rs.getInt(columnName);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public long getLong(int columnIndex) throws DBException {
		try {
			return this.rs.getLong(columnIndex);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public long getLong(String columnName) throws DBException {
		try {
			return this.rs.getLong(columnName);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public ResultSetMetaData getMetaData() throws DBException {
		try {
			return this.rs.getMetaData();
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public Object getObject(int columnIndex) throws DBException {
		try {
			return this.rs.getObject(columnIndex);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public Object getObject(String columnName) throws DBException {
		try {
			return this.rs.getObject(columnName);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public Object getObject(int i, Map<String, Class<?>> map) throws DBException {
		try {
			return this.rs.getObject(i, map);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public Object getObject(String colName, Map<String, Class<?>> map)
			throws DBException {
		try {
			return this.rs.getObject(colName, map);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public Ref getRef(int i) throws DBException {
		try {
			return this.rs.getRef(i);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public Ref getRef(String colName) throws DBException {
		try {
			return this.rs.getRef(colName);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public int getRow() throws DBException {
		try {
			return this.rs.getRow();
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public short getShort(int columnIndex) throws DBException {
		try {
			return this.rs.getShort(columnIndex);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public short getShort(String columnName) throws DBException {
		try {
			return this.rs.getShort(columnName);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public CustomStatement getStatement() throws DBException {
		try {
			Statement stmt = this.rs.getStatement();
			return new CustomStatement(stmt);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public String getString(int columnIndex) throws DBException {
		try {
			String data = this.rs.getString(columnIndex);
			logger.debug(String.valueOf(columnIndex) + "番目 値=[" + data + "]");
			return data;
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public String getString(String columnName) throws DBException {
		try {
			String data = this.rs.getString(columnName);
			logger.debug("カラム吁E[" + String.valueOf(columnName) +  "] 値=[" + data + "]");
			return data;
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public Time getTime(int columnIndex) throws DBException {
		try {
			return this.rs.getTime(columnIndex);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public Time getTime(String columnName) throws DBException {
		try {
			return this.rs.getTime(columnName);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public Time getTime(int columnIndex, Calendar cal) throws DBException {
		try {
			return this.rs.getTime(columnIndex, cal);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public Time getTime(String columnName, Calendar cal) throws DBException {
		try {
			return this.rs.getTime(columnName, cal);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public Timestamp getTimestamp(int columnIndex) throws DBException {
		try {
			Timestamp ts = this.rs.getTimestamp(columnIndex);
			SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddHHmmssS");
			if ( null != ts ) {
				logger.debug(String.valueOf(columnIndex) + "番目 値=[" + sdf.format(ts.getTime()) + "]");
			} else {
				logger.debug(String.valueOf(columnIndex) + "番目 値=[null]");
			}

			return ts;
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public Timestamp getTimestamp(String columnName) throws DBException {
		try {
			Timestamp ts = this.rs.getTimestamp(columnName);
			SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddHHmmssS");
			if ( null != ts ) {
				logger.debug("カラム吁E[" + String.valueOf(columnName) + "] 値=[" + sdf.format(ts.getTime()) + "]");
			} else {
				logger.debug("カラム吁E[" + String.valueOf(columnName) + "] 値=[null]");
			}
			return ts;
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public Timestamp getTimestamp(int columnIndex, Calendar cal)
			throws DBException {
		try {
			Timestamp ts = this.rs.getTimestamp(columnIndex,cal);
			SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddHHmmssS");

			if ( null != ts ) {
				logger.debug(String.valueOf(columnIndex) + "番目 値=[" + sdf.format(ts.getTime()) + "]");
			} else {
				logger.debug(String.valueOf(columnIndex) + "番目 値=[null]");
			}
			return ts;
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public Timestamp getTimestamp(String columnName, Calendar cal)
			throws DBException {
		try {
			Timestamp ts = this.rs.getTimestamp(columnName,cal);
			SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddHHmmssS");
			if ( null != ts ) {
				logger.debug("カラム吁E[" + String.valueOf(columnName) + "] 値=[" + sdf.format(ts.getTime()) + "]");
			} else {
				logger.debug("カラム吁E[" + String.valueOf(columnName) + "] 値=[null]");
			}
			return ts;
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public int getType() throws DBException {
		try {
			return this.rs.getType();
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public URL getURL(int columnIndex) throws DBException {
		try {
			return this.rs.getURL(columnIndex);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public URL getURL(String columnName) throws DBException {
		try {
			return this.rs.getURL(columnName);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	@SuppressWarnings("deprecation")
	public InputStream getUnicodeStream(int columnIndex) throws DBException {
		try {
			return this.rs.getUnicodeStream(columnIndex);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	@SuppressWarnings("deprecation")
	public InputStream getUnicodeStream(String columnName) throws DBException {
		try {
			return this.rs.getUnicodeStream(columnName);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public SQLWarning getWarnings() throws DBException {
		try {
			return this.rs.getWarnings();
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public void insertRow() throws DBException {
		try {
			this.rs.insertRow();
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public boolean isAfterLast() throws DBException {
		try {
			return this.rs.isAfterLast();
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public boolean isBeforeFirst() throws DBException {
		try {
			return this.rs.isBeforeFirst();
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public boolean isFirst() throws DBException {
		try {
			return this.rs.isFirst();
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public boolean isLast() throws DBException {
		try {
			return this.rs.isLast();
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public boolean last() throws DBException {
		try {
			return this.rs.last();
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public void moveToCurrentRow() throws DBException {
		try {
			this.rs.moveToCurrentRow();
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}

	}

	public void moveToInsertRow() throws DBException {
		try {
			this.rs.moveToInsertRow();
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}

	}

	public boolean next() throws DBException {
		try {
			return this.rs.next();
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public boolean previous() throws DBException {
		try {
			return this.rs.previous();
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public void refreshRow() throws DBException {
		try {
			this.rs.refreshRow();
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}

	}

	public boolean relative(int rows) throws DBException {
		try {
			return this.rs.relative(rows);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public boolean rowDeleted() throws DBException {
		try {
			return this.rs.rowDeleted();
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public boolean rowInserted() throws DBException {
		try {
			return this.rs.rowInserted();
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public boolean rowUpdated() throws DBException {
		try {
			return this.rs.rowUpdated();
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public void setFetchDirection(int direction) throws DBException {
		try {
			this.rs.setFetchDirection(direction);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}

	}

	public void setFetchSize(int rows) throws DBException {
		try {
			this.rs.setFetchSize(rows);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}

	}

	public void updateArray(int columnIndex, Array x) throws DBException {
		try {
			this.rs.updateArray(columnIndex, x);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}

	}

	public void updateArray(String columnName, Array x) throws DBException {
		try {
			this.rs.updateArray(columnName, x);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public void updateAsciiStream(int columnIndex, InputStream x, int length)
			throws DBException {
		try {
			this.rs.updateAsciiStream(columnIndex, x, length);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}

	}

	public void updateAsciiStream(String columnName, InputStream x, int length)
			throws DBException {
		try {
			this.rs.updateAsciiStream(columnName, x, length);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}

	}

	public void updateBigDecimal(int columnIndex, BigDecimal x) throws DBException {
		try {
			this.rs.updateBigDecimal(columnIndex, x);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public void updateBigDecimal(String columnName, BigDecimal x) throws DBException {
		try {
			this.rs.updateBigDecimal(columnName, x);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}

	}

	public void updateBinaryStream(int columnIndex, InputStream x, int length)
			throws DBException {
		try {
			this.rs.updateBinaryStream(columnIndex, x, length);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}

	}

	public void updateBinaryStream(String columnName, InputStream x, int length)
			throws DBException {
		try {
			this.rs.updateBinaryStream(columnName, x, length);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}

	}

	public void updateBlob(int columnIndex, Blob x) throws DBException {
		try {
			this.rs.updateBlob(columnIndex, x);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public void updateBlob(String columnName, Blob x) throws DBException {
		try {
			this.rs.updateBlob(columnName, x);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}

	}

	public void updateBoolean(int columnIndex, boolean x) throws DBException {
		try {
			this.rs.updateBoolean(columnIndex, x);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}

	}

	public void updateBoolean(String columnName, boolean x) throws DBException {
		try {
			this.rs.updateBoolean(columnName, x);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}

	}

	public void updateByte(int columnIndex, byte x) throws DBException {
		try {
			this.rs.updateByte(columnIndex, x);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}

	}

	public void updateByte(String columnName, byte x) throws DBException {
		try {
			this.rs.updateByte(columnName, x);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}

	}

	public void updateBytes(int columnIndex, byte[] x) throws DBException {
		try {
			this.rs.updateBytes(columnIndex, x);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}

	}

	public void updateBytes(String columnName, byte[] x) throws DBException {
		try {
			this.rs.updateBytes(columnName, x);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}

	}

	public void updateCharacterStream(int columnIndex, Reader x, int length)
			throws DBException {
		try {
			this.rs.updateCharacterStream(columnIndex, x, length);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}

	}

	public void updateCharacterStream(String columnName, Reader reader,
			int length) throws DBException {
		try {
			this.rs.updateCharacterStream(columnName, reader, length);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}

	}

	public void updateClob(int columnIndex, Clob x) throws DBException {
		try {
			this.rs.updateClob(columnIndex, x);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public void updateClob(String columnName, Clob x) throws DBException {
		try {
			this.rs.updateClob(columnName, x);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public void updateDate(int columnIndex, Date x) throws DBException {
		try {
			this.rs.updateDate(columnIndex, x);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}

	}

	public void updateDate(String columnName, Date x) throws DBException {
		try {
			this.rs.updateDate(columnName, x);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}

	}

	public void updateDouble(int columnIndex, double x) throws DBException {
		try {
			this.rs.updateDouble(columnIndex, x);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}

	}

	public void updateDouble(String columnName, double x) throws DBException {
		try {
			this.rs.updateDouble(columnName, x);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}

	}

	public void updateFloat(int columnIndex, float x) throws DBException {
		try {
			this.rs.updateFloat(columnIndex, x);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}

	}

	public void updateFloat(String columnName, float x) throws DBException {
		try {
			this.rs.updateFloat(columnName, x);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}

	}

	public void updateInt(int columnIndex, int x) throws DBException {
		try {
			this.rs.updateInt(columnIndex, x);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}

	}

	public void updateInt(String columnName, int x) throws DBException {
		try {
			this.rs.updateInt(columnName, x);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}

	}

	public void updateLong(int columnIndex, long x) throws DBException {
		try {
			this.rs.updateLong(columnIndex, x);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}

	}

	public void updateLong(String columnName, long x) throws DBException {
		try {
			this.rs.updateLong(columnName, x);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}

	}

	public void updateNull(int columnIndex) throws DBException {
		try {
			this.rs.updateNull(columnIndex);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}

	}

	public void updateNull(String columnName) throws DBException {
		try {
			this.rs.updateNull(columnName);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}

	}

	public void updateObject(int columnIndex, Object x) throws DBException {
		try {
			this.rs.updateObject(columnIndex, x);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}

	}

	public void updateObject(String columnName, Object x) throws DBException {
		try {
			this.rs.updateObject(columnName, x);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}

	}

	public void updateObject(int columnIndex, Object x, int scale)
			throws DBException {
		try {
			this.rs.updateObject(columnIndex, x, scale);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}

	}

	public void updateObject(String columnName, Object x, int scale)
			throws DBException {
		try {
			this.rs.updateObject(columnName, x, scale);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}

	}

	public void updateRef(int columnIndex, Ref x) throws DBException {
		try {
			this.rs.updateRef(columnIndex, x);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}

	}

	public void updateRef(String columnName, Ref x) throws DBException {
		try {
			this.rs.updateRef(columnName, x);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}

	}

	public void updateRow() throws DBException {
		try {
			this.rs.updateRow();
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}

	}

	public void updateShort(int columnIndex, short x) throws DBException {
		try {
			this.rs.updateShort(columnIndex, x);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}

	}

	public void updateShort(String columnName, short x) throws DBException {
		try {
			this.rs.updateShort(columnName, x);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public void updateString(int columnIndex, String x) throws DBException {
		try {
			this.rs.updateString(columnIndex, x);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public void updateString(String columnName, String x) throws DBException {
		try {
			this.rs.updateString(columnName, x);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public void updateTime(int columnIndex, Time x) throws DBException {
		try {
			this.rs.updateTime(columnIndex, x);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}

	}

	public void updateTime(String columnName, Time x) throws DBException {
		try {
			this.rs.updateTime(columnName, x);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public void updateTimestamp(int columnIndex, Timestamp x)
			throws DBException {
		try {
			this.rs.updateTimestamp(columnIndex, x);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public void updateTimestamp(String columnName, Timestamp x)
			throws DBException {
		try {
			this.rs.updateTimestamp(columnName, x);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}

	}

	public boolean wasNull() throws DBException {
		try {
			return this.rs.wasNull();
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

}
